<template>
  <div class="condition">
    <span>排序顺序</span>
    <el-select v-model="sortBy" clearable placeholder="">
      <el-option
        v-for="item in options"
        :key="item.value"
        :label="item.label"
        :value="item.value"
      >
      </el-option>
    </el-select>
  </div>
</template>

<script>
export default {
  name: "condition",
  data() {
    return {
      sortBy: "time",
      options: [
        { value: "priceHighToLow", label: "价格从高到低" },
        { value: "priceLowToHigh", label: "价格从低到高" },
        { value: "time", label: "上架时间" },
        { value: "hot", label: "人气排行" },
      ],
    };
  },
};
</script>

<style lang="scss" scoped>
.condition {
  width: 280px;
  height: 40px;
  span {
    float: left;
    width: 60px;
    font-size: 0.9rem;
    line-height: 40px;
  }
  .el-select {
    width: 190px;
  }
}
</style>